import { createRouter, createWebHistory, createWebHashHistory } from "vue-router";

const routes = [
  {
    path: "/",
    name: "home",
    component: () => import("@/views/home.vue"),
    children: [
      {
        path: "message",
        name: "message",
        component: () => import("@/views/Message/index.vue"),
      },
      {
        path: "demand",
        name: "demand",
        component: () => import("@/views/Demand/index.vue"),
      },
      {
        path: "major",
        name: "major",
        component: () => import("@/views/Major/index.vue"),
      },
      {
        path: "user",
        name: "user",
        component: () => import("@/views/User/index.vue"),
      },
      // {
      //   path: "dataView",
      //   name: "dataView",
      //   component: () => import("@/views/DataView/index.vue"),
      // },
    ],
  },
  {
    path: "/login",
    name: "login",
    component: () => import("@/views/login.vue"),
  },
  {
    path: "/dataView",
    name: "dataView",
    component: () => import("@/views/DataView/index.vue"),
  },
];

const router = createRouter({
  history: createWebHashHistory(process.env.BASE_URL),
  routes,
});

export default router;
